package com.itheima.test;

public class Ticket implements Runnable{//买票案列的执行体(无睡眠时间)
    private int ticket = 100;

    @Override
    public void run() {
        while(ticket>0){
            ticket--;
            System.out.println(Thread.currentThread().getName()+"正再买票,还剩下"+ticket+"张");
        }
    }
}
